package com.xiaoxu.content;

import com.spring4all.swagger.EnableSwagger2Doc;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author xiaoxu
 * @version 1.0
 * @description  SpringBoot启动类
 * @date 2023/1/15 14:49
 */
@SpringBootApplication(scanBasePackages = {"com.xiaoxu.content","com.xiaoxu.base","com.xiaoxu.messagesdk"})
@Slf4j
@EnableSwagger2Doc
@EnableTransactionManagement
@EnableFeignClients(basePackages={"com.xiaoxu.content.feignclient"})
public class ContentApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext ctx = SpringApplication.run(ContentApplication.class, args);
        log.info("\n"+"\t\t\t\t******************************************"+"\n"+"\t\t\t\t**\t贝壳学堂- {} 模块项目启动成功" +
                        "\t**"+"\n\t\t\t\t**\t\t\t贝壳学堂-版本v1.0测试版\t\t**"+"\n\t\t\t\t**\t贝壳学堂-系统配置模块端口号: {}" +
                        "\t\t**"+"\n\t\t\t\t******************************************"
                ,ctx.getEnvironment().getProperty("spring.application.name")
                ,ctx.getEnvironment().getProperty("server.port"));
    }
}
